const { VueLoaderPlugin } = require("vue-loader");

module.exports = function (api, params) {
  const { getWebpackConfig } = api;
  const config = getWebpackConfig();

  config.module
    .rule("vue")
    .test(/\.vue$/)
    .exclude.add(/node_modules/)
    .end()
    .use("vue-loader")
    .loader("vue-loader");

  config.plugin("VueLoaderPlugin").use(VueLoaderPlugin, []);
};
